typedef vector<int>::iterator intVecIterator;

int index=-1;
bool GetIndex(const vector<int>& v, int begin,int end, int t){
	if(end<begin)
		return false;
	cout<<"..."<<endl;
	int mid = (begin+end)/2;
	if(v[mid]<t)	{
		begin = mid+1;
		return GetIndex(v,begin,end,t);
	}	else if(v[mid]>t)	{
		end = mid-1;
		return GetIndex(v,begin,end,t);
	}	else	{
		index = mid;
		return true;
	}
}

int main(int argc, char* argv[]){
	vector<int> v;
	for(int i=0;i<100001;i++)
		v.push_back(i);
	GetIndex(v,0,100001,1);
	cout<<index<<endl;
	return 0;
}

